.d-flex.justify-content-between.flex-wrap.flex-md-nowrap.align-items-center.pt-3.pb-2.mb-3.border-bottom
  %h1.h2 Upload Attachment

%form{ :method => "post", :enctype => "multipart/form-data" }
  .form-group.row
    %label.col-lg-2.col-form-label{ :for => "overview" }
      %a.btn.btn-info{ :href=> '#modaloverview', "data-toggle"=>'modal' }
        Uploading Attachment Help
    #modaloverview.modal.fade{ :tabindex=>'-1', :role=>'dialog' }
      .modal-dialog.modal-lg{ :role => "document" }
        .modal-content
          .modal-header
            %h3#modal-label
              Attachments
            %button.close{ :type => "button", "data-dismiss" => "modal", "aria-label" => "Close"}
              &times;
          .modal-body
            %p &bullet;&nbsp;Only jpg and png are supported for screenshots
            %p &bullet;&nbsp;The file name is inherited from the file.
            %p &bullet;&nbsp;jpg end png files can be directly inserted into your report template with the metacharacter " ツ "
            %p &bullet;&nbsp;jpg end png files can be inserted into your findings by using the string " [!!screenshot_name.png!!] "
            %p &bullet;&nbsp;Multiple files can be uploaded at once.
            %p &bullet;&nbsp;If an attachment is uploaded as an appendice, the data it contains can be used in your documents template
            %p
              %b For now, only XML can be added as an appendice
            %p
              For exemple, if you upload a file <b>"recon.xml"</b>, which has a structure like the following :
            %div{:style => "background-color:#F2F3F4"}
              %p
                &lt;host&gt;
              %p
                &nbsp;&nbsp;&lt;ip&gt;1.1.1.1&lt;/ip&gt;
              %p
                &nbsp;&nbsp;&lt;hostname&gt;www.exemple1.com&lt;/hostname&gt;
              %p
                &lt;/host&gt;
              %p
                &lt;host&gt;
              %p
                &nbsp;&nbsp;&lt;ip&gt;2.2.2.2&gt;&lt;/ip&gt;
              %p
                &nbsp;&nbsp;&lt;hostname&gt;www.exemple2.com&lt;/hostname&gt;
              %p
                &lt;/host&gt;
            %p
              then you could call this data in your document template by doing, for exemple :
            %div{:style => "background-color:#F2F3F4"}
              %p
                ¬report/appendices/&lt;&lt;name_of_your_file_without_extension&gt;&gt;/host¬
              %p
                IP : πipπ
              %p
                hostname : πhostnameπ
              %p
                ∆
            %p
              %br
              This would print in your report all the IP and hostnames contained by report.xml

  - if @no_file == "1"
    You forgot to include a file, silly
    %br
    %br

  .form-group.row
    %label.col-lg-2.col-form-label{ :for => "files" } Upload Files
    .col-lg-4
      .custom-file
        %input#files.custom-file-input{ :type => "file", :name => "files[]", :multiple => true }
        %label.custom-file-label{ :for => "files" } Choose files
  .form-group.row
    %label.col-lg-2.col-form-label{ :for => "appendice" } Appendice
    .col-lg-4
      .form-check
        %input{ :type => 'hidden', :name => 'appendice', :value => "0"}
        %input#appendice.form-check-input{ :type => 'checkbox', :name => 'appendice', :value => "1"}

  %br
  %input.btn.btn-primary{ :type => "submit", :value => "Upload" }
  %a.btn.btn-secondary{ :href => "/report/#{@report.id}/edit" }
    Cancel
